/**
  @file     	DESIGNPATTERN_ComputerComponent.cpp 
  @brief    	1.When the algorithm to create complex object should be independent of the part of the object, 
                  as well as their assembly;
				2.When construction process must be allowed to construct the object is different;
  @author  	arvin
  @version 	1.0   2012/12/20
 */

#include "stdafx.h"

#ifndef CXX_DESIGNPATTERN_COMPUTERCOMPONENT_H
#include "DESIGNPATTERN_ComputerComponent.h"
#endif

 /**
 * Construction
 *
 * @param COMPUTER_TYPE eComputer
 * @return
 */
ComputerComponent::ComputerComponent(COMPUTER_TYPE eComputer) :
	m_eComputer(eComputer)
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
}

/**
* Destruction
*
* @param VOID
* @return
*/
ComputerComponent::~ComputerComponent()
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
}

/**
* Operation
*
* @param VOID
* @return
*/
VOID
ComputerComponent::Operation()
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
}

/**
* SetComputer
*
* @param COMPUTER_TYPE eComputer
* @return
*/
VOID ComputerComponent::SetComputer(COMPUTER_TYPE eComputer)
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
	m_eComputer = eComputer;
}

/**
* GetComputer
*
* @param VOID
* @return COMPUTER_TYPE
*/
COMPUTER_TYPE
ComputerComponent::GetComputer()
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
	return m_eComputer;
}

/**
* Construction
*
* @param VOID
* @return
*/
DesktopComponent::DesktopComponent() :
	ComputerComponent(COMPUTER_DESKTOP)
{
	DEBUG_PRINTF("");
}

/**
* Destruction
*
* @param VOID
* @return
*/
DesktopComponent::~DesktopComponent()
{
	DEBUG_PRINTF("");
}

/**
* Operation
*
* @param VOID
* @return
*/
VOID
DesktopComponent::Operation()
{
	ComputerComponent::Operation();
	DEBUG_PRINTF("");
}


/**
* Construction
*
* @param VOID
* @return
*/
NotebookComponent::NotebookComponent() :
	ComputerComponent(COMPUTER_NOTEBOOK)
{
	DEBUG_PRINTF("");
}

/**
* Destruction
*
* @param VOID
* @return
*/
NotebookComponent::~NotebookComponent()
{
	DEBUG_PRINTF("");
}

/**
* Operation
*
* @param VOID
* @return
*/
VOID
NotebookComponent::Operation()
{
	ComputerComponent::Operation();
	DEBUG_PRINTF("");
}


/**
* Construction
*
* @param VOID
* @return
*/
ServerComponent::ServerComponent() :
	ComputerComponent(COMPUTER_SERVER)
{
	DEBUG_PRINTF("");
}

/**
* Destruction
*
* @param VOID
* @return
*/
ServerComponent::~ServerComponent()
{
	DEBUG_PRINTF("");
}

/**
* Operation
*
* @param VOID
* @return
*/
VOID
ServerComponent::Operation()
{
	ComputerComponent::Operation();
	DEBUG_PRINTF("");
}
/* EOF */